package com.app.micaihu.bean.news;

import android.text.TextUtils;

import com.app.micaihu.bean.ad.NativeAd;
import com.app.micaihu.bean.shop.ShoInfo;
import com.app.micaihu.bean.speak.ILaud;
import com.app.micaihu.configure.TypeConstant;

import java.util.List;

/**
 * 文章新闻详情
 * Created by linkai on 2016/7/19.
 */
public class NewsContent extends ShareBean implements ILaud{

    private String articleTitle;//标题
    private String articleLaud;//点赞总数
    private String dislikeNum;//点踩总数
    private String commentNum;//评论总数
    private String shareNum;//分享总数
    private String articleTime;//时间
    //文章类型(1.普通文章、2.普通图集、3普通视频 4.电商文章 5.网页文章 6.电商网页软文 7.网页视频 8.轻专题 9.广告)
    private String articleType;//文章类型
    private String articleUrl;//文章url
    private String articleContent;//文章内容
    private String displayComment;//是否加载评论
    private String isCollect;//是否已收藏 1已收藏 0未收藏
    private String isPraise;//是否点赞 否点赞过 1是 0否
    private String authorRankName;//作者军衔名称
    private String authorRankIcon;//作者军衔图片
    private String status;//关注状态 0未关注 1已关注 2互相关注 ,粉丝列表有该参数
    private String emokoCmt;//虎哥点评

    private List<NewsEntity> aboutList;//相关新闻集合
    private List<NativeAd> adList;//相关新闻集合配置
    private List<NativeAd> topAdInfo;//内页广告配置
    private List<NativeAd> detailMiddleAdInfo;//文中广告配置
    private boolean like;//点赞或者不喜欢
    private ShoInfo shopInfo;//商品信息

    private String recommendControl;
    private String commentControl;
    private String imgUrl;
    private String honourPic; //军团勋章
    private String armyGroupInfo; //所属军团 或 军团职位
    private String gid; //所属军团 id
    private int aboultNewsHeight;

    public int getAboultNewsHeight() {
        return aboultNewsHeight;
    }

    public void setAboultNewsHeight(int aboultNewsHeight) {
        this.aboultNewsHeight = aboultNewsHeight;
    }

    public List<NativeAd> getDetailMiddleAdInfo() {
        return detailMiddleAdInfo;
    }

    public void setDetailMiddleAdInfo(List<NativeAd> detailMiddleAdInfo) {
        this.detailMiddleAdInfo = detailMiddleAdInfo;
    }

    public String getGid() {
        return gid;
    }

    public void setGid(String gid) {
        this.gid = gid;
    }

    public String getHonourPic() {
        return honourPic;
    }

    public void setHonourPic(String honourPic) {
        this.honourPic = honourPic;
    }

    public String getArmyGroupInfo() {
        return armyGroupInfo;
    }

    public void setArmyGroupInfo(String armyGroupInfo) {
        this.armyGroupInfo = armyGroupInfo;
    }

    public String getRecommendControl() {
        return recommendControl;
    }

    public void setRecommendControl(String recommendControl) {
        this.recommendControl = recommendControl;
    }

    public String getCommentControl() {
        return commentControl;
    }

    public void setCommentControl(String commentControl) {
        this.commentControl = commentControl;
    }

    public String getImgUrl() {
        return imgUrl;
    }

    public void setImgUrl(String imgUrl) {
        this.imgUrl = imgUrl;
    }

    public ShoInfo getShopInfo() {
        return shopInfo;
    }

    public void setShopInfo(ShoInfo shopInfo) {
        this.shopInfo = shopInfo;
    }

    public boolean getLikeOrDisLike() {
        return like;
    }

    public void setLike(boolean like) {
        this.like = like;
    }

    public NewsContent(){
        //默认分享类型为新闻类型
        this.shareType = TypeConstant.SHARE_TYPE_NEWS;
    }

    public String getArticleTitle() {
        return articleTitle;
    }

    public void setArticleTitle(String articleTitle) {
        this.articleTitle = articleTitle;
    }

    public String getArticleLaud() {
        if(TextUtils.isEmpty(articleLaud) || TextUtils.equals("0",articleLaud)){
            return "";
        }
        return articleLaud;
    }

    public void setArticleLaud(String articleLaud) {
        this.articleLaud = articleLaud;
    }

    public String getDislikeNum() {
        if(TextUtils.isEmpty(dislikeNum) || TextUtils.equals("0",dislikeNum)){
            return "";
        }
        return dislikeNum;
    }

    public void setDislikeNum(String dislikeNum) {
        this.dislikeNum = dislikeNum;
    }

    public String getCommentNum() {
        return commentNum;
    }

    public void setCommentNum(String commentNum) {
        this.commentNum = commentNum;
    }

    public String getShareNum() {
        return shareNum;
    }

    public void setShareNum(String shareNum) {
        this.shareNum = shareNum;
    }

    public String getArticleTime() {
        return articleTime;
    }

    public void setArticleTime(String articleTime) {
        this.articleTime = articleTime;
    }

    public String getArticleType() {
        return articleType;
    }

    public void setArticleType(String articleType) {
        this.articleType = articleType;
    }

    public String getArticleUrl() {
        return articleUrl;
    }

    public void setArticleUrl(String articleUrl) {
        this.articleUrl = articleUrl;
    }

    public String getArticleContent() {
        return articleContent;
    }

    public void setArticleContent(String articleContent) {
        this.articleContent = articleContent;
    }

    public String getDisplayComment() {
        return displayComment;
    }

    public void setDisplayComment(String displayComment) {
        this.displayComment = displayComment;
    }

    public boolean getIsCollect() {
        if("1".equals(isCollect)){
            return true;
        }
        return false;
    }

    public void setIsCollect(String isCollect) {
        this.isCollect = isCollect;
    }

    public boolean getIsPraise() {
        if("1".equals(isPraise)){
            return true;
        }
        return false;
    }

    public String getAuthorRankName() {
        return authorRankName;
    }

    public void setAuthorRankName(String authorRankName) {
        this.authorRankName = authorRankName;
    }

    public String getAuthorRankIcon() {
        return authorRankIcon;
    }

    public void setAuthorRankIcon(String authorRankIcon) {
        this.authorRankIcon = authorRankIcon;
    }


    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getEmokoCmt() {
        return emokoCmt;
    }

    public void setEmokoCmt(String emokoCmt) {
        this.emokoCmt = emokoCmt;
    }

    public void setIsPraise(String isPraise) {
        this.isPraise = isPraise;
    }

    public List<NewsEntity> getAboutList() {
        return aboutList;
    }

    public void setAboutList(List<NewsEntity> aboutList) {
        this.aboutList = aboutList;
    }

    public List<NativeAd> getAdList() {
        return adList;
    }

    public void setAdList(List<NativeAd> adList) {
        this.adList = adList;
    }

    public List<NativeAd> getTopAdInfo() {
        return topAdInfo;
    }

    public void setTopAdInfo(List<NativeAd> topAdInfo) {
        this.topAdInfo = topAdInfo;
    }




    @Override
    public String getILaudOperateType() {
        return getLikeOrDisLike() ? TypeConstant.ZAN_NORMAL : TypeConstant.ZAN_DISLIKE;
    }

    @Override
    public String getILaudNum() {
        if(getLikeOrDisLike()){
           return getArticleLaud();
        }else{
          return  getDislikeNum();
        }
    }

    @Override
    public String getILaudType() {
        return "0";
    }

    @Override
    public void setILaudNum(String iLaudNum) {
        if(getLikeOrDisLike()){
            setArticleLaud(iLaudNum);
        }else{
            setDislikeNum(iLaudNum);
        }
    }

    @Override
    public String getNewsId() {
        return getArticleId();
    }

    @Override
    public String getICommentId() {
        return "";
    }

    @Override
    public String getIParentCmtId() {
        return "";
    }

    @Override
    public String getIType() {
        return null;
    }

    @Override
    public String getIToUid() {
        return "";
    }

    @Override
    public void setIToUid(String toUid) {

    }
}
